<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        var count = parseInt(prompt('请输入班级的人数：'));
        var arr = [];
        var sum = 0;
        var avg = 0;
        var max = 0;
        var min = 0;

        for(let i = 0; i < count; i++){
            let score = parseInt(prompt(`请输入第${i + 1}位学生的成绩：`))
            arr.push(score)
            console.log(arr.length,arr[i])
            sum = sum + score
        }
        console.log(arr,sum)


        console.log(`总成绩为${sum}`)
        console.log(`平均成绩为${sum / count}`)
        newArr = arr.sort()
        console.log(`最低分为${newArr[0]}`)

        newArrPro = newArr.reverse()
        console.log(`最高分为${newArr[0]}`)









    </script>
</body>
</html>